package com.kobe.tools.sqlparser;


import net.sf.jsqlparser.JSQLParserException;

/**
 * @author ：caopengfei
 * @date ：2020/11/9
 */
public class SqlParserDemo {


    public static void main(String[] args) throws JSQLParserException {
        String   zbSQl = "SELECT A.YLJGDM,COUNT(1) AS ZBSJL FROM ZYYZMXB A(NOLOCK),ZYJZJLB T(NOLOCK)" +
                " WHERE A.YLJGDM=T.YLJGDM AND A.JZLSH=T.JZLSH AND A.XGBZ=T.XGBZ " +
                "AND T.CYSJ >= '@sKssj' AND T.CYSJ <= '@sJssj' " +
                "AND (A.ZJHM IS NULL OR LEN(RTRIM(A.ZJHM))=0 " +
                "OR LEN(RTRIM(A.ZJHM))=15 OR LEN(RTRIM(A.ZJHM))=18)" +
                " AND 0=0 GROUP BY A.YLJGDM";


        SqlParserUtil sqlParserUtil = new SqlParserUtil();

        sqlParserUtil.test_select(zbSQl);


        System.out.println(sqlParserUtil);

    }




}
